home *** CD-ROM | disk | FTP | other *** search
- Path: ilnews.iil.intel.com!pauls
- From: Michael Tiomkin <mtiomkin@iil.intel.com>
- Newsgroups: comp.lang.c
- Subject: Re: Can main() function be called?
- Date: 6 Feb 1996 13:52:25 GMT
- Organization: Intel Israel
- Message-ID: <4f7mep$22nt@ilx018.iil.intel.com>
- References: <4f3hgv$ml8@columba.udac.uu.se>
- NNTP-Posting-Host: ilnt169.iil.intel.com
- Mime-Version: 1.0
- Content-Type: multipart/mixed;
- boundary="-------------------------------208592502514484"
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- This is a multi-part message in MIME format.
-
- ---------------------------------208592502514484
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
-
- You shouldn't have any problem to call main() recursively.
- What usually happens is that the C initializer code calls
- main with the corresponding parameters (nargs, args, and
- env?). If you write your main knowing that it will be called
- recursively, this is doable. Of course, another question is
- WHY should you do this: usually, people use the main to
- analyze the parameters and distribute the work between other
- functions.
-
- Michael Tiomkin
-
- ---------------------------------208592502514484
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain
-
- From: m92fra@sabik.tdb.uu.se (Fredrik Raadesand)
- Newsgroups: comp.lang.c
- Subject: Re: Can main() function be called?
- Date: 5 Feb 1996 00:03:43 GMT
- Organization: department of Scientific Computing, Uppsala University, Sweden
- Message-ID: <4f3hgv$ml8@columba.udac.uu.se>
-
- > I think that it cannot be done, I see no reasonalbe way how main()
- > could be called more than once.
- >
- >
- > What is your thoughts on this?
- >
-
- I would say the simplest way to find out is to try it out ?
- ..to post the question on the net is probably more difficult. ;)
-
- Either it works or it doesn't, right ?
-
- /Fredrik
-
- ---------------------------------208592502514484--
-